<!DOCTYPE html>
<html lang="en">
<head>
  <meta charset="UTF-8">
  <title>Title</title>
  <style>
    div {
      width: 200px;
      height: 200px;
      background-color: #817dff;
    }
  </style>
</head>
<body>
<div>

</div>

<script>
  document.querySelector('div').onmouseover = () => {
    console.log(1);
  }
</script>
</body>
</html>
